const path=require('path');
const baseConfig=require('./webpack.base');
const merge =require('webpack-merge');
const OptimizeCSSAssetsPlugin = require('optimize-css-assets-webpack-plugin');

console.log('process.env.node_ENV----',process.env.NODE_ENV);
let config=process.env.NODE_ENV=='production'?{
    mode: 'production',
    plugins:[new OptimizeCSSAssetsPlugin({})]
}:{
    mode: 'development',
    devtool: 'source-map',
}

module.exports=merge(baseConfig,config);